{$formstart}

<table class="pagetable" cellspacing="0">
  <thead>
    <tr>
      <th>{$mod->Lang('name')}</th>
      <th class="pageicon">{$mod->Lang('prompt_default')}</th>
      <th class="pageicon">&nbsp;</th>
      <th class="pageicon">&nbsp;</th>
      <th class="pageicon">&nbsp;</th>
      <th class="pageicon">&nbsp;</th>
    </tr>
  </thead>
  <tbody>
{foreach from=$categorylist item='one' name='cats'}
  {cycle values="row1,row2" assign="rowclass"}
  <tr class="{$rowclass}" onmouseover="this.className='{$rowclass}hover';" onmouseout="this.className='{$rowclass}';">
    <td>{$one.name}</td>
    <td align="center">
      {if $one.id == $default_category}
        {cgimage image='icons/system/true.gif'}
      {else}
        {module_action_link module='CGBlog' action='admin_editcategory' sub='dflt' cid=$one.id imageonly=1 image='icons/system/false.gif' text=$mod->Lang('set_default')}
      {/if}
    </td>
    <td>{module_action_link module='CGBlog' action='admin_editcategory' sub='edit' cid=$one.id imageonly=1 image='icons/system/edit.gif' text=$mod->Lang('edit')}</td>
    <td>{if $one.sort_order > 1}{module_action_link module='CGBlog' action='admin_editcategory' sub='mup' cid=$one.id imageonly=1 image='icons/system/sort_up.gif' text=$mod->Lang('move_up')}{/if}</td>
    <td>{if !$smarty.foreach.cats.last}{module_action_link module='CGBlog' action='admin_editcategory' sub='mdown' cid=$one.id imageonly=1 image='icons/system/sort_down.gif' text=$mod->Lang('move_down')}{/if}</td>
    <td>{if $one.id != $default_category}{module_action_link module='CGBlog' action='admin_editcategory' sub='del' cid=$one.id imageonly=1 image='icons/system/delete.gif' text=$mod->Lang('delete')}{/if}</td>
  </tr>
{/foreach}
  </tbody>
</table>

<div class="pageoverflow">
  <input type="hidden" name="{$actionid}cid" value="-1"/>
  <input type="hidden" name="{$actionid}sub" value="add"/>
  <p class="pagetext">{$mod->Lang('add_category')}</p>
  <p class="pageinput">
    <input type="text" name="{$actionid}catname" size="50" maxlength="50"/>
  </p>
</div>

<div class="pageoverflow">
  <p class="pagetext">&nbsp;</p>
  <p class="pageinput"><input type="submit" name="{$actionid}submit" value="{$mod->Lang('submit')}"/></p>
</div>

{$formend}